<style>
    .loading-icon {
        text-align: left;
        color: #666;
    }

    .content-box{
        display: none;
    }


    #questions-list,#reasoning-result {
        padding: 10px;
        border: 1px solid #ddd;
        margin-bottom: 20px;
        border-radius: 6px;
        background-color: #f5f5f5;
    }

    #questions-list .list {
        margin: 10px 0;
    }

    #questions-list .list .title {
        font-weight: bold;
        margin-top: 10px;
        font-size: 14px;
    }

    #questions-list .list .options {
        margin: 10px 0;
    }

    #questions-list .list .jiexi {
        margin: 10px 0;
    }
</style>

<form id="add-ai-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Course_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!-- <input id="c-course_id" data-rule="required" data-source="course/index" class="form-control selectpage"
                name="row[course_id]" type="text" value="" readonly> -->
            {:build_select('row[course_id]', $bankList, '', ['class'=>'selectpicker', 'required'=>''])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Typedata')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="typedataList" item="vo"}
                <label for="row[typedata]-{$key}"><input id="row[typedata]-{$key}" name="row[typedata]" type="radio"
                        value="{$key}" {in name="key" value="1" }checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
   
   
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Diffdata')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="diffdataList" item="vo"}
                <label for="row[diffdata]-{$key}"><input id="row[diffdata]-{$key}" name="row[diffdata]" type="radio"
                        value="{$key}" {in name="key" value="1" }checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">选择平台:</label>
        <div class="col-xs-12 col-sm-8">
    
            <div class="radio">
                <label><input name="row[pingtai]" type="radio" value="siliconflow" checked/> 硅基流动</label>
                <label><input name="row[pingtai]" type="radio" value="deepseek"/> deepseek</label>
            </div>
    
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">选择模型:</label>
        <div class="col-xs-12 col-sm-8">
    
            <div class="radio">
                <label><input name="row[model]" type="radio" value="v3" checked /> deepseek-V3</label>
                <label><input name="row[model]" type="radio" value="r1" /> deepseek-R1</label>
            </div>
    
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">提示词:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea  data-rule="required" id="c-prompt" class="form-control" rows="5" name="row[prompt]"
                cols="50" placeholder="可以提出题目数量等要求，或者多选题可以要求答案必须两个或两个以上等"></textarea>            
    
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="button" class="btn btn-info btn-ai-start">开始生成</button>
            <button type="button" class="btn btn-danger btn-ai-end" style="display: none;">停止</button>
    
        </div>
    </div>
    <textarea  name="row[questions]" style="display: none;"></textarea>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <div class="content-box">

                <div class="loading-icon">
                    <i class="fa fa-spinner fa-spin fa-2x"></i>
                </div>
                <div id="reasoning-result"></div>
                <div id="content-result"></div>
                <div id="questions-list"></div>
            </div>
    
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
